<template>
  <div class="box">
    <div class="wrapper f-bian" v-for="(item,index) in dataList" :key="index">
      <div class="left f1">
        <div>证书名称：<span v-text="item.CertName">ds </span></div>
        <div>证书数量：<span v-text="item.ReviewNumber">2</span></div>
      </div>
      <div class="right f100 f-zhong"> <button @click="do_next(item)">审批</button></div>
    </div>
    <!--查询资源错误提醒-->
    <div class="noResource" v-show="imgShow">
      <div><img src="../../assets/img/3aa41c17c34735172a543eed6289129c.png" alt=""></div>
      <p>暂无审批任务！</p>
    </div>
  </div>
</template>

<script>
    export default {
        name: "myExamine",
      inject:['reload'],
      data(){
          return{
            dataList:[],
            imgShow:false
          }
      },
      created(){
          this.getCertBill()
      },
      methods:{
        do_next(item){
          this.$bus.$emit("CertName",item.CertName)
          sessionStorage.setItem('certName',item.CertName)
          this.$router.push('/ExamineDetail');

        },
        getCertBill(){
          let me=this
          me.$Global.zcServer.Post({
            IsNeedLogin:'true',
            Paras:{
              Name:'Vue_CourseResource',
              Action:'getCertBill',
              UserId:me.$Global.UserId ,
              Data:{
                UserId:me.$Global.UserId
              }
            },
            Callback:me.cb_getCertBill,
            Scope:me
          });
        },
        cb_getCertBill(resJson,scope){
          console.log("我的待审",resJson)
          if(resJson.success){
            if(resJson.data.length>0){
              this.dataList=resJson.data
            }else {
              this.imgShow=true
            }

          }else {

          }
        }
      }
    }
</script>

<style scoped>
  .wrapper{
    background-color: white;
    padding: 15px 5px;
    margin-top: 10px;
  }
  .left{
    color: #868686;
    line-height: 30px;
  }
  .left span{
    color:black
  }
  .f100{
    width:62px;
  }
  .f100 button{
    width: 60px;
    height: 40px;
    text-align: center;
    /*line-height: 30px;*/
    font-size: 18px;
    background-color: #5BC2F6;
    color: white;
    border: none;
    border-radius: 4px;
  }
  .noResource{
    width: 100%;
    display: flex;
    align-items:center ;
    justify-content: center;
    flex-direction: column
  }
  .noResource img{
    height: 150px;
    width: 150px;
    /*visibility:hidden;*/
  }
</style>
